package com.ui;

import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import com.MainFrame;
import com.ui.impl.IconModifyPanel;
import com.ui.impl.JarFileModify;
import com.ui.impl.TitleModifyPanel;
import com.ui.impl.XMLAndFileModifyPanel;

public class MainPanel extends JPanel{
	private MainFrame frame = null;
	private JScrollPane scrollpane = null;
	
	public MainPanel(MainFrame mf){
		this.frame = mf;
	}
	
	public void init(){
		IconModifyPanel iconModifyPanel = new IconModifyPanel();
		iconModifyPanel.initPanel();
		
		XMLAndFileModifyPanel xmlAndFileModifyPanel = new XMLAndFileModifyPanel(frame);
		xmlAndFileModifyPanel.initPanel();
		
		TitleModifyPanel titleModifyPanel = new TitleModifyPanel(frame);
		titleModifyPanel.initPanel();
		
		JarFileModify jarPanel = new JarFileModify(frame);
		jarPanel.initPanel();
		
		this.add(iconModifyPanel);
		this.add(xmlAndFileModifyPanel);
		this.add(titleModifyPanel);
		this.add(jarPanel);
		int h = iconModifyPanel.panelHeight+xmlAndFileModifyPanel.panelHeight+titleModifyPanel.panelHeigth+jarPanel.panelHeight;
		this.setPreferredSize(new Dimension(800,h));
	}
}
